{template header.html}
<script type="text/javascript">
function setflag(i) {
    if (i == -1) {
        $('#flag_back').show();
    } else {
        $('#flag_back').hide();
    }
}
function dr_confirm_verfiy() {
	art.dialog.confirm("{lang('015')}", function(){
		$('#action').val('flag');
		var _data = $("#myform").serialize();
		var _url = window.location.href;
		if ((_data.split('ids')).length-1 <= 0) {
			$.dialog.tips(lang['select_null'], 2);
			return true;
		}
		// 将表单数据ajax提交验证
		$.ajax({type: "POST",dataType:"json", url: _url, data: _data,
			success: function(data) {
				//验证成功
				if (data.status == 1) {
                    var ret = data.code;
                    for(var o in ret){
                        dr_tips(ret[o], 5);
                    }
                    var html = data.id;
                    for(var o in html){
                        $.post(html[o], {}, function(){});
                    }
                    setTimeout('window.location.reload(true)', 5000); // 刷新页
				} else if (data.status == 2) {
                    var html = data.id;
                    for(var o in html){
                        $.post(html[o], {}, function(){});
                    }
                    dr_tips(data.code, 3, 1);
                    setTimeout('window.location.reload(true)', 3000); // 刷新页
                } else {
					dr_tips(data.code);
					return true;
				}
			},
			error: function(HttpRequest, ajaxOptions, thrownError) {
                alert(HttpRequest.responseText);
			}
		});
		return true;
	});
	return false;
}
</script>
<div class="subnav">
	<div class="content-menu ib-a blue line-x">
		{$menu}
	</div>
	<div class="bk10"></div>
	<div class="explain-col">
        <font color="gray">{lang('html-319')}</font>
	</div>
	<div class="bk10"></div>
	<div class="table-list">
		<form action="" method="post" name="myform" id="myform">
        <input name="action" id="action" type="hidden" value="" />
		<table width="100%">
		<thead>
		<tr>
			<th width="20" align="right"><input name="dr_select" id="dr_select" type="checkbox" onClick="dr_selected()" />&nbsp;</th>
			<th hide="1" width="50" align="left">Id</th>
			<th align="left">{lang('mod-38')}</th>
			<th align="left">{lang('mod-35')}</th>
			<th width="80" align="center">{lang('101')}</th>
			<th width="120" align="left">{lang('105')}</th>
			<th align="left" class="dr_option">{lang('option')}</th>
		</tr>
		</thead>
		<tbody>
		{loop $list $t}
        {php $c=dr_string2array($t['content']);}
		<tr id="dr_row_{$t['id']}">
			<td align="right"><input name="ids[]" type="checkbox" class="dr_select" value="{$t['id']}" />&nbsp;</td>
			<td hide="1" align="left">{$t['id']}</td>
			<td align="left"><a href="{dr_url(APP_DIR.'/verify/edit',array('id'=>$t['id']))}">{if $c['thumb']}<font color="#FF0000">{lang('html-387')}</font>{/if}{$c['name']}</a></td>
			<td align="left"><a href="{dr_url(APP_DIR.'/verify/index', array('status'=>$param['status'],'cid'=>$t['cid']))}">{$c['title']}</a></td>
			<td align="center"><a href="javascript:;" onclick="dr_dialog_member('{$t.uid}')">{dr_strcut($t.author, 10)}</a></td>
			<td align="left">{dr_date($t['inputtime'], NULL, 'red')}</td>
			<td align="left" class="dr_option">
			<a href="{SITE_URL}{APP_DIR}/index.php?c=extend&type=verify&id={$t.id}" target="_blank" class="ago">{lang('go')}</a>
			{if $this->ci->is_auth(APP_DIR.'/admin/verify/edit')}<a class="aedit" href="{dr_url(APP_DIR.'/verify/edit',array('id'=>$t['id']))}">{lang('edit')}</a>{/if}
			</td>
		</tr>
		{/loop}
		<tr>
			<th width="20" align="right"><input name="dr_select" id="dr_select" type="checkbox" onClick="dr_selected()"/>&nbsp;</th>
			<td colspan="7" align="left" style="border:none">
			{if $this->ci->is_auth(APP_DIR.'/admin/home/del')}<input type="button" class="button" value="{lang('del')}" name="option" onClick="$('#action').val('del');dr_confirm_set_all('{lang('015')}')" />{/if}
            {if $this->ci->is_auth(APP_DIR.'/admin/verify/edit')}
			<input type="button" class="button" value="{lang('html-318')}" name="option" onClick="dr_confirm_verfiy()" />
			<select name="flagid" onchange="setflag(this.value)">
			<option value="1">{lang('html-320')}</option>
			<option value="-1">{lang('html-321')}</option>
			</select>
            <input id="flag_back" type="text" name="backcontent" value="" class="input-text" style="display: none;width: 400px;" />
			{/if}
			</td>
		</tr>
		</tbody>
		</table>
		</form>
        <div id="pages"><a>{dr_lang('html-346', $param['total'])}</a>{$pages}</div>
	</div>
</div>
{template footer.html}